# Joint distribution F(x_1, x_2, ..., x_d) where x_k is the execution time of the k'th function

mydata <- read.table("output_10_100.txt", header=TRUE, sep=" ")
#mydata <- read.table("full.txt", header=TRUE, sep=" ")
input <- 10:100
mydata <- cbind(input, mydata)

nb.run <- dim(mydata)[1]
nb.fct <- dim(mydata)[2]

equation <- array("", c(nb.fct))
for (i in 1:nb.fct) {
	equation[i] <- paste(names(mydata)[i], " ~ ")
	nb.fct.added <- 0
	for (j in 1:nb.fct) {
		fct.added <- FALSE
		if (j != i) {
			equation[i] <- paste(equation[i], names(mydata)[j])
			nb.fct.added <- nb.fct.added + 1
			fct.added <- TRUE
		}
		if (fct.added & nb.fct.added < nb.fct - 1) equation[i] <- paste(equation[i], " + ")
		
	}
}

mfit <- lm(equation[2], data=mydata)	


# Multiple Linear Regression Example


